bitkeeper revision 1.1668.1.8 (42a8ab2d2hMDGWkEyEFVRMJaIQWGdQ)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 9 Jun 2005 20:48:45 +0000 (20:48 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 9 Jun 2005 20:48:45 +0000 (20:48 +0000)
Add floating-point save/restore support on domain switch
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>

xen/arch/ia64/domain.c
xen/arch/ia64/xensetup.c
xen/include/asm-ia64/xensystem.h

index f44b8864615bf9741c39d6cf5df4d1a13b63669c..8de53757def63256873f1268753a20c96680e27a 100644 (file)
@@ -406,6 +406,7 @@ printk("new_thread, about to call dom_fw_setup\n");
 printk("new_thread, done with dom_fw_setup\n");
        // don't forget to set this!
        v->vcpu_info->arch.banknum = 1;
+       memset(v->arch._thread.fph,0,sizeof(struct ia64_fpreg)*96);
 }
 #endif // CONFIG_VTI
 
index 413cf66b8983b97567ae76318e4d84dd5667194a..ae179b458af8bbeed381e0f1c37be06d1b198e7a 100644 (file)
@@ -218,6 +218,9 @@ void start_kernel(void)
 
     init_frametable();
 
+    ia64_fph_enable();
+    __ia64_init_fpu();
+
     alloc_dom0();
 #ifdef DOMU_BUILD_STAGING
     alloc_domU_staging();
index 7c63a738b0e8033b6323c8dec3d44ee556b66abe..c7c9771feecfdee93a29e26014dc1e708c5fa380 100644 (file)
@@ -50,6 +50,8 @@ extern struct task_struct *vmx_ia64_switch_to (void *next_task);
 } while (0)
 #else // CONFIG_VTI
 #define __switch_to(prev,next,last) do {                                                        \
+       ia64_save_fpu(prev->arch._thread.fph);                                                  \
+       ia64_load_fpu(next->arch._thread.fph);                                                  \
        if (IA64_HAS_EXTRA_STATE(prev))                                                          \
                ia64_save_extra(prev);                                                           \
        if (IA64_HAS_EXTRA_STATE(next))                                                          \